Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: preserve result height when results are invalidated on edit #254

Merged
merged 25 commits into from
May 13, 2024

Conversation

mgreminger
Copy link
Owner

This is done instead of deleting the results to reduce vertical jumping on updates.

This is done instead of deleting the results to reduce vertical jumping on updates.
Previous tests look for stale results to be detached, now they are hidden to prevent layout jumps
Prevents missed changes during debounce timeout
The only ones that remain are those that require a rendering change. All of those the were included to trigger a recalculation should be covered by an update th mathcellchanged
Removing `$cells = $cells` entirely failed since DOM updates for parsing errors were no longer being applied.
Creates a larger target for focusing using a mouse or touch input
Should improve startup time and reduce memory usage at startup
For tall cells, it is sometimes hidden after clicking the delete button
This preserves the browser's using of Control+Minus to zoom out
Parse and store statement at time of edit instead of at time of assembling statements for solver.

Also, fix crash when last table row is selected and earlier row is deleted. Test added for this case as well.
Previously, they were reparse on any sheet change
Since table parsing is skipped if there is a syntax error anywhere in the table, even an edit on an inactive row can impact table parsing
Especially important for sheet loading since this function will get called for every math field in a table but the result will always be the same
@mgreminger mgreminger merged commit 92b5865 into main May 13, 2024
2 checks passed
@mgreminger mgreminger deleted the preserve-result-height branch May 13, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant